import request from '@/utils/request'
import { listNoPageTheme } from "@/api/vote/theme"

// 查询投票项列表
export function listItem(query) {
  return request({
    url: '/vote/item/list',
    method: 'get',
    params: query
  })
}

// 查询投票项列表
export function listNoPageItem(query) {
  return request({
    url: '/vote/item/allList',
    method: 'get',
    params: query
  })
}


// 查询投票项详细
export function getItem(id) {
  return request({
    url: '/vote/item/' + id,
    method: 'get'
  })
}

// 新增投票项
export function addItem(data) {
  return request({
    url: '/vote/item',
    method: 'post',
    data: data
  })
}

// 修改投票项
export function updateItem(data) {
  return request({
    url: '/vote/item',
    method: 'put',
    data: data
  })
}

// 删除投票项
export function delItem(id) {
  return request({
    url: '/vote/item/' + id,
    method: 'delete'
  })
}

// 导出投票项
export function exportItem(query) {
  return request({
    url: '/vote/item/export',
    method: 'get',
    params: query
  })
}


export function selectVoteTheme(){
  return listNoPageTheme({});
}

